import $http from '@/API/HTTP'
import { joinUrl, wx } from '@/utils/utils'
//微信支付
export function userPayApi(data) {
  return $http.post(`${wx}/wxUserPay`, data)
}
// 商品详情二维码
export function codeGoodsQRApi(data) {
  return $http.post(`${wx}/codeGoodsQR`, data);
}
// 商品轮播图
export function goodsBannerListApi(data) {
  return $http.post(`${joinUrl}/groupShopPropagandaList`, data)
}
// 商品列表
export function goodsListApi(data) {
  return $http.post(`${joinUrl}/groupCGoodsList`, data)
}
// 商品详情
export function goodsDetailApi(data) {
  return $http.post(`${joinUrl}/groupCGoodsDetails`, data)
}
// 分类列表
export function getShopTypeCateListApi(data) {
  return $http.post(`${joinUrl}/getShopTypeCateGList`, data)
}
// 添加与编辑收货地址
export function addOrUpdateAddressApi(data) {
  if (data.id) {
    return $http.post(`${joinUrl}/wxUserAddressUpdate`, data)
  } else {
    return $http.post(`${joinUrl}/wxUserAddressAdd`, data)
  }
}
// 删除收货地址
export function addressDelApi(data) {
  return $http.post(`${joinUrl}/wxUserAddressDel`, data)
}
// 添加收货列表
export function addressListApi(data) {
  return $http.post(`${joinUrl}/wxUserAddressList`, data)
}
// 添加订单
export function addGoodsOrderApi(data) {
  return $http.post(`${joinUrl}/groupGoodsOrderAdd`, data)
}
// 订单列表
export function goodsOrderListApi(data) {
  return $http.post(`${joinUrl}/groupGoodsOrderList`, data)
}
// 订单详情
export function goodsOrderDetailApi(data) {
  return $http.post(`${joinUrl}/groupGoodsOrderDetailed`, data)
}
//快递单号
export function fastPieceApi(data) {
  return $http.post(`${joinUrl}/fastPiece`, data)
}
//优惠券
export function couponByPhoneApi(data) {
  return $http.post(`${joinUrl}/getCouponByPhone`, data)
}
//锦讯公司列表
export function companyListApi(data) {
  return $http.post(`${joinUrl}/getCompany`, data)
}
// 锦讯会员卡申请-添加
export function applyRegMemberAdd(data) {
  return $http.post(`${joinUrl}/applyRegMemberAdd`, data);
}
// 删除未支付订单号
export function groupMyGoodsDelApi(data) {
  return $http.post(`${joinUrl}/groupMyGoodsDel`, data);
}
// 商品车型列表
export function goodsCarListApi(data) {
  return $http.post(`${joinUrl}/veGoodsList`, data);
}
// 统计通过分享进入商品详情页
export function getklmxxApi(data) {
  return $http.post(`${joinUrl}/getklmxx`, data);
}
// 获取分享人
export function getServiceNameApi(data) {
  return $http.post(`${joinUrl}/getServiceName`, data);
}
// 客户成交
export function wxUrApi(data) {
  return $http.post(`${wx}/wxUr`, data);
}